<template>
  <div class="header-album">
    <div class="ar">
      <span class="yu-titleColor">歌手：</span>
      <span class="yu-color-text yu-textColor-hover cursor-pointer text-sm" v-for="(song, index) in album?.artists" :key="song.id">
        {{ song.name }}
        <span v-if="index < album?.artists?.length - 1"> / {{  album?.artists?.length }}</span>
      </span>
    </div>
    <div class="company">
      <span class="yu-titleColor">发行公司：</span>
      <span class="yu-color-text yu-textColor-hover cursor-pointer">{{ album?.company }}</span>
    </div>
    <div class="time">
      <span class="yu-titleColor">发行时间：</span>
      <span>{{ timestampToYMD(album?.createTime) }}</span>
    </div>
  </div>
</template>

<script setup>
import {timestampToYMD} from '@/utils/index'
const props = defineProps({
  album: Object
})
// console.log(props)
</script>

<style scoped lang="scss">
.header-album {
  .ar, .time, .company {
    margin: 6px 0 ;
  }
}
</style>
